<!DOCTYPE html>
<html lang="zh-cN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>JavaScipt异步编程</title>
    <script src="../js/js10_aysnc_easy.js" async></script>
    <link rel="stylesheet" href="../css/common.css">
</head>
<body>
    <h1>async / await 关键字</h1>
    <p class="msg"></p>
    <script>
        document.addEventListener("DOMContentLoaded",function(){
            let msg = document.querySelector(".msg");
            hello1().then(data =>{
                msg.innerHTML += `${data}<br>`;
            });
            hello2().then(data =>{
                msg.innerHTML += `${data}<br>`;
            });

            handleStart().then(value=>{
                msg.innerHTML += `${value.msg},执行时间${value.time}<br>`;
            });
        });
    </script>
</body>
</html>